/*  This file is part of -_-.

    -_- is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    -_- is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with -_-.  If not, see <http://www.gnu.org/licenses/>.

    Copyright 2012-2013 Oliver Katz */

#ifndef __VISUAL_SCRIPT_H
#define __VISUAL_SCRIPT_H

#include "visual.h"

namespace sleepyface
{
    namespace visual
    {
        namespace script
        {
            class Environment
            {
            private:
                map<string, Color> theme;

            public:
                Environment();
                Color getColor(string c);
                Color setColor(string c, Color v);
            };

            class RenderCommand
            {
            public:
                const static int pass = 0;
                const static int rectangle = 1;
                const static int line = 2;
                const static int text = 3;
                const static int image = 4;

            private:
                int cmd;
                string surface;
                Color color;
                string font;
                string textData;
                string imageData;
                Region region;

            public:
                RenderCommand();
                RenderCommand(string s);
                RenderCommand createPass();
                RenderCommand createRectangle(Region r, Color c);
                RenderCommand createLine(Region r, Color c);
                RenderCommand createText(Region r, Color c, string f, string t);
                RenderCommand createImage(Region r, Color c, string p);
                int getCommand();
                string getSurface();
                Color getColor();
                string getFont();
                string getText();
                string getImage();
                Region getRegion();
                Region render(Renderer &renderer);
                string display();
            };
        }
    }
}

#endif
